﻿Imports DevExpress.Web.ASPxScheduler
Imports DevExpress.Web.ASPxScheduler.Internal
Imports DevExpress.XtraScheduler
Imports DevExpress.Web.ASPxEditors

Public Class ucActividadFormSaveCallbackCommand
    Inherits DevExpress.Web.ASPxScheduler.Internal.AppointmentFormSaveCallbackCommand

    Public Sub New(ByVal oASPxScheduler As ASPxScheduler)
        MyBase.New(oASPxScheduler)
    End Sub

    Protected Friend Shadows ReadOnly Property Controller() As ucActividadFormController
        Get
            Return CType(MyBase.Controller, ucActividadFormController)
        End Get
    End Property

    Protected Overrides Function CreateAppointmentFormController(ByVal apt As Appointment) As AppointmentFormController
        Return New ucActividadFormController(Control, apt)
    End Function

    Protected Overrides Sub AssignControllerValues()
        Dim txtCantidadComisariosSubscriptos As ASPxTextBox = CType(FindControlByID("txtCantidadComisariosSubscriptos"), ASPxTextBox)

        Controller.CantidadComisariosSubscriptos = txtCantidadComisariosSubscriptos.Text

        MyBase.AssignControllerValues()
    End Sub

    'Protected Sub ASPxScheduler1_BeforeExecuteCallbackCommand( _
    '    ByVal sender As Object, ByVal e As SchedulerCallbackCommandEventArgs)
    '    If e.CommandId = SchedulerCallbackCommandId.AppointmentSave Then
    '        e.Command = New UserAppointmentSaveCallbackCommand( _
    '            CType(sender, ASPxScheduler))
    '    End If
    'End Sub


End Class
